<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>扫码登录页面</title>
    <link href="{{ mix('/css/main.css') }}" rel="stylesheet">
</head>
<body>
<div class="container">
    <h1>扫码登录</h1>
    <p>请使用手机微信扫一扫二维码登录</p>
    <img src="{{ $data['full_url'] }}">
</div>
</body>
<script src="{{ mix('js/app.js') }}"></script>
<script>
    setInterval(function () {
        $.post({
            url:'{{ route('manage.checkLogin') }}',
            data:{'key':'{{$data['ticket']}}'},
            dataType:'json',
            success:function (ret){
                if(ret.status == 200){
                    window.location.href = '{{ url('/manage/login-success') }}?token=' + ret['data']['token'];
                }
            },
            error:function () {
                // alert('请求失败');
            }
        });
    },1500);
</script>
</html>
